import { get, post, put, del } from '@/js/api/dataSource'
export default {
	procedure: {
		// 工序类型tree
		findProcedureTypeTree () {
			return get({ url: '/technology/procedureType/findProcedureTypeTree' })
		},
		// 工序列表查询
		findProducePageQuery () {
			return post({ url: '/technology/procedure/pageQuery', responseComplete: true })
		},
		// 工序下拉
		findListAll () {
			return get({ url: '/technology/procedure/findListAll' })
		},
		// 启用停用
		updateEnables () {
			return put({ url: '/technology/procedure/updateEnable', responseComplete: true })
		},
		getNextCode () {
			return get({ url: '/technology/procedure/getNextCode' })
		},
		// 保存 新增修改
		saveOrUpdate () {
			return post({ url: '/technology/procedure/saveOrUpdate', responseComplete: true, autoSuccessMsg: true })
		},
		findDetailByParam () {
			return get({ url: '/technology/procedure/findDetailByParam' })
		},
		// 批量删除
		deleteMulity () {
			return del({ url: '/technology/procedure/batchDelete', responseComplete: true })
		},
		// 工序类型大类小类下拉
		findListTypeAll () {
			return get({ url: '/technology/procedureType/findListTypeAll' })
		},
		// 工序类型保存 新增修改
		procedureTypeSaveOrUpdate () {
			return post({ url: '/technology/procedureType/saveOrUpdate', responseComplete: true, autoSuccessMsg: true })
		},
		// 删除类别
		deleteProcedureTypeById (id) {
			return del({ url: `/technology/procedureType/deleteById/${id}`, responseComplete: true, autoSuccessMsg: true })
		}
	}
}
